So glad you are all OK! My dog was bitten, shaken three times and thrown on her back by a larger dog this spring. It was a yellow lab, and he was going for her stomach when the owner called him off. My dog was on our property and on a lead. This owner allowed his two dogs to roam free. I reported the incident to the police.
My husband and I did a lot of bicycling years ago. We always carried air horns like the ones used on boats for safety. Wait until the dog gets fairly close. One blast will do. It stops even large angry dogs in their tracks. I've started carrying an air horn again. No need for a gun.